package com.yiibai.tutorial.javabasic.variable;

public class ForExample {
	public static void main(String[] args) {
		int length = 10;
		int sum = 0;
		System.out.println("------------------------------");
		for (int i = 0; i < length; i++) {
			System.out.println(i);
			sum += i;
		}
		System.out.println("------------------------------");
		System.out.println("for循环总数值是：" + sum);
	}
}
